" vim:ft=vim

Execute(FloatermShow/Hide):
  FloatermNew
  FloatermHide
  AssertEqual '', &filetype
  FloatermShow
  AssertEqual 'floaterm', &filetype

Execute(create 2 floaterms):
  FloatermKill!
  FloatermNew
  let bufnr1 = bufnr()
  FloatermNew
  let bufnr2 = bufnr()

Execute(hide all floaterms):
  FloatermHide!
  AssertEqual -1,bufwinnr(bufnr1)
  AssertEqual -1,bufwinnr(bufnr2)

Execute(show all floaterms):
  FloatermShow!
  AssertNotEqual -1,bufwinnr(bufnr1)
  AssertNotEqual -1,bufwinnr(bufnr2)

Execute([N]FloatermHide):
  FloatermKill!
  FloatermNew
  let bufnr1 = bufnr()
  execute bufnr1 . 'FloatermHide'
  AssertEqual -1,bufwinnr(bufnr1)

  FloatermNew
  let bufnr2 = bufnr()
  execute bufnr2 . 'FloatermHide'
  AssertEqual -1,bufwinnr(bufnr2)

Execute([N]FloatermShow):
  execute bufnr1 . 'FloatermShow'
  AssertEqual bufnr1, bufnr()
  execute bufnr2 . 'FloatermShow'
  AssertEqual bufnr2, bufnr()

Execute(FloatermHide --name):
  FloatermKill!
  FloatermNew --name=ft1
  FloatermHide ft1
  FloatermNew --name=ft2
  FloatermHide ft2

Execute(FloatermShow --name):
  FloatermShow ft1
  FloatermShow ft2

Execute (Exit):
  stopinsert
  FloatermKill!
  sleep 100m
